package com.coolw.design.pattern.behavior.state;

/**
 * 状态上下文
 *
 * @author coolw
 * @date 2025/4/22 14:39
 */
public class StateContext {

    /**
     * 当前状态
     */
    private State state;

    public StateContext(State state) {
        this.state = state;
    }

    public void request() {
        this.state.handle(this);
    }

    public void setState(State state) {
        this.state = state;
    }
}
